import Request from '../utils/http.js';

export default {
	//获取订单列表
	getOrderList: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/myserviceorder',
			method: 'POST',
			params: params
		});
	},
	
	//删除订单
	delOrder: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/delorder',
			method: 'POST',
			params: params
		});
	},
	
	//取消待支付的订单
	closeOrder: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/close_myorder',
			method: 'POST',
			params: params
		});
	},
	
	//获取订单详情
	getOrderView: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/getuserorderdetail',
			method: 'POST',
			params: params
		});
	},
	
	//验收订单
	sureOrder: function(params) {
		return Request.httpTokenRequest({
			url: '/api/user/myserviceorder_edit',
			method: 'POST',
			params: params
		});
	}
}